Optimal. Leaf size=69 \[ \frac {(a B+A b) \sin (c+d x)}{d}+\frac {1}{2} x (a (A+2 C)+2 b B)+\frac {a A \sin (c+d x) \cos (c+d x)}{2 d}+\frac {b C \tanh ^{-1}(\sin (c+d x))}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.16, antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.128, Rules used = {4074, 4047, 8, 4045, 3770} \[ \frac {(a B+A b) \sin (c+d x)}{d}+\frac {1}{2} x (a (A+2 C)+2 b B)+\frac {a A \sin (c+d x) \cos (c+d x)}{2 d}+\frac {b C \tanh ^{-1}(\sin (c+d x))}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3770
Rule 4045
Rule 4047
Rule 4074
Rubi steps
\begin {align*} \int \cos ^2(c+d x) (a+b \sec (c+d x)) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\frac {a A \cos (c+d x) \sin (c+d x)}{2 d}-\frac {1}{2} \int \cos (c+d x) \left (-2 (A b+a B)-(2 b B+a (A+2 C)) \sec (c+d x)-2 b C \sec ^2(c+d x)\right ) \, dx\\ &=\frac {a A \cos (c+d x) \sin (c+d x)}{2 d}-\frac {1}{2} \int \cos (c+d x) \left (-2 (A b+a B)-2 b C \sec ^2(c+d x)\right ) \, dx-\frac {1}{2} (-2 b B-a (A+2 C)) \int 1 \, dx\\ &=\frac {1}{2} (2 b B+a (A+2 C)) x+\frac {(A b+a B) \sin (c+d x)}{d}+\frac {a A \cos (c+d x) \sin (c+d x)}{2 d}+(b C) \int \sec (c+d x) \, dx\\ &=\frac {1}{2} (2 b B+a (A+2 C)) x+\frac {b C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {(A b+a B) \sin (c+d x)}{d}+\frac {a A \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 68, normalized size = 0.99 \[ \frac {4 (a B+A b) \sin (c+d x)+a A \sin (2 (c+d x))+2 a A c+2 a A d x+4 a C d x+4 b B d x+4 b C \tanh ^{-1}(\sin (c+d x))}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.70, size = 73, normalized size = 1.06 \[ \frac {{\left ({\left (A + 2 \, C\right )} a + 2 \, B b\right )} d x + C b \log \left (\sin \left (d x + c\right ) + 1\right ) - C b \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (A a \cos \left (d x + c\right ) + 2 \, B a + 2 \, A b\right )} \sin \left (d x + c\right )}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.24, size = 159, normalized size = 2.30 \[ \frac {2 \, C b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, C b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + {\left (A a + 2 \, C a + 2 \, B b\right )} {\left (d x + c\right )} - \frac {2 \, {\left (A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, A b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.85, size = 100, normalized size = 1.45 \[ \frac {a A \cos \left (d x +c \right ) \sin \left (d x +c \right )}{2 d}+\frac {a A x}{2}+\frac {A a c}{2 d}+\frac {a B \sin \left (d x +c \right )}{d}+a C x +\frac {C a c}{d}+\frac {A b \sin \left (d x +c \right )}{d}+B x b +\frac {B b c}{d}+\frac {C b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.35, size = 89, normalized size = 1.29 \[ \frac {{\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a + 4 \, {\left (d x + c\right )} C a + 4 \, {\left (d x + c\right )} B b + 2 \, C b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, B a \sin \left (d x + c\right ) + 4 \, A b \sin \left (d x + c\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.11, size = 156, normalized size = 2.26 \[ \frac {A\,b\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a\,\sin \left (c+d\,x\right )}{d}+\frac {A\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,B\,b\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,C\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {A\,a\,\sin \left (2\,c+2\,d\,x\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right ) \left (A + B \sec {\left (c + d x \right )} + C \sec ^{2}{\left (c + d x \right )}\right ) \cos ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________